package com.redwine.app;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.view.annotation.ViewInject;
import com.lidroid.xutils.view.annotation.event.OnClick;

/**
 * 申请供应商完成
 * 作者：gassion on 17/8/7 22:46
 * 最可怕的敌人，就是没有坚强的信念。
 */

public class ApplyForSupplierFinishActivity extends BaseActivity {

    @ViewInject(R.id.header_title)
    private TextView headerTitle;
    @ViewInject(R.id.layout_back)
    private LinearLayout layoutBack;
    public static final String PURCHASER_CERTIFICATION = "PURCHASER_CERTIFICATION";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_apply_for_supplier_finish);
        ViewUtils.inject(this);
        initView();
    }

    private void initView() {
        Intent intent = getIntent();
        boolean isPurchaseCertification = false;
        if (null != intent) {
            isPurchaseCertification = intent.getBooleanExtra(PURCHASER_CERTIFICATION, false);
        }
        if (isPurchaseCertification)
            headerTitle.setText(R.string.purchaser_certification);
        else
            headerTitle.setText(R.string.supplier_certification);
        layoutBack.setVisibility(View.VISIBLE);
    }

    @OnClick({R.id.layout_back})
    public void mClick(View v) {
        switch (v.getId()) {

            case R.id.layout_back:
                finish();
                break;

        }
    }


}
